<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:p="http://primefaces.org/ui">

    <ui:composition template="/template.xhtml">

        <ui:define name="title">
            <h:outputText value="#{bundle.CreateBillTitle}"></h:outputText>
        </ui:define>

        <ui:define name="body">

            <h:panelGroup id="messagePanel" layout="block">
                <h:messages errorStyle="color: red" infoStyle="color: green" layout="table"/>
            </h:panelGroup>

            <h:form>
                عدد الكراتين  :  <h:inputText size="10" value="#{calculationController.total_Number2}"  readonly="true"/>
                <p:dataTable value="#{calculationController.orderList}" var="qu_num"
                             styleClass="order-table"
                             paginator="false" rows="50"
                             paginatorTemplate="{CurrentPageReport}  {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"
                             rowsPerPageTemplate="50,100,150">

                    <p:column>
                        <f:facet name="header"> الوزن </f:facet>
                        #{qu_num.quantity}
                    </p:column>

                    <p:column>
                        <f:facet name="header"> العدد </f:facet>
                        #{qu_num.number}
                    </p:column>

                    <p:column>
                        <f:facet name="header"> الناتج </f:facet>
                        #{qu_num.total}
                    </p:column>

                    <p:column>
                        <f:facet name="header"> المجموع</f:facet>
                        #{qu_num.finalTotal}
                    </p:column>

                </p:dataTable>

                <br/>
                <br/>
                <br/>
                <br/>
                اضافة وزن
                <br/>
                <br/>

                العدد   <h:inputText size="10" value="#{calculationController.number_quantity}"/>


             *   الوزن   <h:inputText size="10" value="#{calculationController.quantity}" />

                = <h:inputText size="10" value="#{calculationController.totalRow}" />
                <br/>

                <br/>
                <center>
                    <h:commandButton value="+" action="#{calculationController.addActionExporter}" styleClass="btn-primary btn" />

                <br/>
                <br/>

    الوزن <h:inputText size="10" value="#{calculationController.totalKg}" readonly="true" />
     <h:selectBooleanCheckbox value="#{calculationController.libra}"  >
         <f:ajax render="lbr"  event="change" listener="#{billInformationController.itemListener}"/>
     </h:selectBooleanCheckbox>


     LBR:      <h:inputText size="10" value="#{calculationController.totalLbr}" readonly="true" id="lbr" />
     كجم
     <br/>

                <br/>

                <h:commandButton value="       تم      " action="#{calculationController.finishExporterCalculation}"  styleClass="btn-primary btn"/>
 </center>
            </h:form>
            <br/>
            <br/>


        </ui:define>
    </ui:composition>

</html>